package com.study.java8.lamdba;

public class LamdbaDemo1 {


    interface Print {

        String printSomeThing(String val);
    }

    public void pringSomething(String something, Print print) {
        print.printSomeThing(something);
    }

    public static void main(String[] args) {
        LamdbaDemo1 lamdbaDemo1 = new LamdbaDemo1();
/*
        String val="abc";
        Print print=new Print() {
            @Override
            public void printSomeThing(String val) {
                System.out.println(val);
            }
        };


        lamdbaDemo1.pringSomething(val,print);*/


        String val = "abc";
        Print print = (String v) -> {
            System.out.println(v);
            return v;
        };

        String s = print.printSomeThing(val);
        System.out.println(s);
        lamdbaDemo1.pringSomething(val, print);


    }

}
